3.1.47 \(\int \sqrt {1-\cos ^2(x)} \, dx\) [47]

Optimal. Leaf size=12 \[ -\cot (x) \sqrt {\sin ^2(x)} \]

[Out]

-cot(x)*(sin(x)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3255, 3286, 2718} \begin {gather*} \sqrt {\sin ^2(x)} (-\cot (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[1 - Cos[x]^2],x]

[Out]

-(Cot[x]*Sqrt[Sin[x]^2])

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3255

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*cos[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rule 3286

Int[(u_.)*((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Sin[e + f*x]^n)^FracPart[p]/(Sin[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Sin[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps

\begin {align*} \int \sqrt {1-\cos ^2(x)} \, dx &=\int \sqrt {\sin ^2(x)} \, dx\\ &=\left (\csc (x) \sqrt {\sin ^2(x)}\right ) \int \sin (x) \, dx\\ &=-\cot (x) \sqrt {\sin ^2(x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 12, normalized size = 1.00 \begin {gather*} -\cot (x) \sqrt {\sin ^2(x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[1 - Cos[x]^2],x]

[Out]

-(Cot[x]*Sqrt[Sin[x]^2])

________________________________________________________________________________________

Maple [A]
time = 0.24, size = 13, normalized size = 1.08

method result size
default \(-\frac {2 \sin \left (x \right ) \cos \left (x \right )}{\sqrt {2-2 \cos \left (2 x \right )}}\) \(13\)
risch \(-\frac {i \sqrt {-\left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}}\, {\mathrm e}^{2 i x}}{2 \left ({\mathrm e}^{2 i x}-1\right )}-\frac {i \sqrt {-\left ({\mathrm e}^{2 i x}-1\right )^{2} {\mathrm e}^{-2 i x}}}{2 \left ({\mathrm e}^{2 i x}-1\right )}\) \(67\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1-cos(x)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-sin(x)*cos(x)/(sin(x)^2)^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 10, normalized size = 0.83 \begin {gather*} -\frac {1}{\sqrt {\tan \left (x\right )^{2} + 1}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-cos(x)^2)^(1/2),x, algorithm="maxima")

[Out]

-1/sqrt(tan(x)^2 + 1)

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 4, normalized size = 0.33 \begin {gather*} -\cos \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-cos(x)^2)^(1/2),x, algorithm="fricas")

[Out]

-cos(x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {1 - \cos ^{2}{\left (x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-cos(x)**2)**(1/2),x)

[Out]

Integral(sqrt(1 - cos(x)**2), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 24 vs. \(2 (10) = 20\).
time = 0.40, size = 24, normalized size = 2.00 \begin {gather*} -\frac {2 \, \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, x\right )^{3} + \tan \left (\frac {1}{2} \, x\right )\right )}{\tan \left (\frac {1}{2} \, x\right )^{2} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1-cos(x)^2)^(1/2),x, algorithm="giac")

[Out]

-2*sgn(tan(1/2*x)^3 + tan(1/2*x))/(tan(1/2*x)^2 + 1)

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 10, normalized size = 0.83 \begin {gather*} -\mathrm {cot}\left (x\right )\,\sqrt {{\sin \left (x\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1 - cos(x)^2)^(1/2),x)

[Out]

-cot(x)*(sin(x)^2)^(1/2)

________________________________________________________________________________________